When specified, the project is installed to a separate destdir
inside the container instead of the container's root filesystem.
This can be used to install several projects into a common extension
directory:
```
$ (cd mutter; meson-build.sh --sysext) &&
(cd gnome-shell; meson-build.sh --sysext)
```
We will later add a separate command to extract the directory
from the container and turn it into a system extension suitable
for use with systemd-sysext.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3498>
--dist Run meson dist
--reconfigure Reconfigure the project
--wipe Wipe build directory and reconfigure
+ --sysext Install to separate target suitable for systemd-sysext
-h, --help Display this help
}
install_command() {
- if [[ $RUN_DIST ]]; then
- echo -n :
+ local destdir=${BUILD_SYSEXT:+/var/lib/extensions/$TOOLBOX}
+ if [[ $destdir || ! $RUN_DIST ]]; then
+ echo -n "sudo meson install -C $BUILD_DIR ${destdir:+--destdir=$destdir}"
else
- echo -n "sudo meson install -C $BUILD_DIR"
+ echo -n :
fi
}
--longoptions 'dist' \
--longoptions 'reconfigure' \
--longoptions 'wipe' \
+ --longoptions 'sysext' \
--longoptions 'help' \
-- "$@") || die "Run $(basename $0) --help to see available options"
shift
;;
+ --sysext)
+ BUILD_SYSEXT=1
+ shift
+ ;;
+
-D)
MESON_OPTIONS+=(-D$2)
shift 2